/* name: journey
 * author: 5ab
 * created at: 2024-05-30
 */
#include <bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(), (x).end()
#define ssz(x) (int((x).size()))

auto chmax = [](auto& x, auto y) { if (x < y) x = y; };
auto chmin = [](auto& x, auto y) { if (y < x) x = y; };

using ll = long long;
const int N = 300, INF = 1e9;
const ll lINF = 1e18;

int g[N][N];
ll gd[N + 1];

signed main()
{
	freopen("journey.in", "r", stdin);
	freopen("journey.out", "w", stdout);
	
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	
	int n, m, q;
	
	cin >> n >> m >> q;
	for (int i = 0; i < n; i++)
		fill(g[i], g[i] + n, INF);
	for (int i = 0, x, y, c; i < m; i++)
	{
		cin >> x >> y >> c, x--, y--;
		chmin(g[x][y], c);
	}
	
	for (int k = 0; k < n; k++)
		for (int i = 0; i < n; i++)
			for (int j = 0; j < n; j++)
				chmin(g[i][j], g[i][k] + g[k][j]);
	
	gd[n] = 0;
	vector<tuple<int, int, int>> ss;
	for (int i = 0; i < n; i++)
		ss.emplace_back(i, i, 0);
	
	fill(gd, gd + n, lINF);
	for (int i = n - 1; i >= 0; i--)
	{
		int s = -1, t = -1, d = INF;
		for (int j = 0; j < ssz(ss); j++)
		{
			for (int k = j + 1; k < ssz(ss); k++)
			{
				if (g[get<1>(ss[j])][get<0>(ss[k])] < d)
					d = g[get<1>(ss[j])][get<0>(ss[k])], s = j, t = k;
				if (g[get<1>(ss[k])][get<0>(ss[j])] < d)
					d = g[get<1>(ss[k])][get<0>(ss[j])], s = k, t = j;
			}
			if (g[get<1>(ss[j])][get<0>(ss[j])] < d && get<2>(ss[j]))
				d = g[get<1>(ss[j])][get<0>(ss[j])], s = t = j;
		}
		if (s == -1)
			break;
		gd[i] = gd[i + 1] + d;
		get<1>(ss[s]) = get<1>(ss[t]), get<2>(ss[s]) = 1;
		ss.erase(ss.begin() + t);
		// for (auto [x, y, z] : ss)
		// 	cerr << x << "," << y << "," << z << " ";
		// cerr << endl;
	}
	
	while (q--)
	{
		int x; ll ans = lINF;
		cin >> x;
		for (int i = 0; i <= n; i++)
			chmin(ans, 1ll * x * i + gd[i]);
		cout << ans << "\n";
	}
	
	return 0;
}
// started coding at: 05-30 11:20:39